package com.heking.zplayer.qlyopen;

import android.text.TextUtils;

import androidx.annotation.Keep;

/**
 * @Author: zhoug
 * @Date: 2024-11-05
 * @Description:
 */
@Keep
public class QlyTokenParams {
    private String appId;
    private String secret;
    //1：应用token(拥有该应用全部权限)，2：自定义token(拥有该应用部分权限)
    private int operatorType = -100;
    /**
     * read：只读，write：可读可写
     **/
    private String action;
    //2：设备，获取应用token时不传
    private String targetType;
    //设备id,多个用逗号分割
    private String target;

    public boolean check() {
        return !TextUtils.isEmpty(action) && !TextUtils.isEmpty(targetType) && !TextUtils.isEmpty(appId)
                && !TextUtils.isEmpty(target) && !TextUtils.isEmpty(secret) && operatorType != -100;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public int getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(int operatorType) {
        this.operatorType = operatorType;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getTargetType() {
        return targetType;
    }

    public void setTargetType(String targetType) {
        this.targetType = targetType;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }
}
